﻿<Window x:Class="eStock.ChildWindows.WndAddEditComponent"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:CustomControls="clr-namespace:eStock.Controls.CustomControls"
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:System="clr-namespace:System;assembly=mscorlib"
        Title="Bauteil hinzufügen" Height="290" Width="600" ResizeMode="NoResize" WindowStyle="SingleBorderWindow" Topmost="True" ShowInTaskbar="False" Closing="WindowClosing">
    <xctk:BusyIndicator Name="busyIndi" BusyContent="Bauteil wird hinzugefügt. Bitte warten...">
    <Grid Background="#E4E4E4">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>
        <DockPanel Background="White" Grid.Row="0" LastChildFill="True">
                <Image Name="imgPreview" VerticalAlignment="Top"  
                       MinWidth="180" MaxWidth="180" Source="..\Images\default.png" Margin="0,10,10,0" Cursor="Hand"  MouseUp="ImgPreviewMouseUp" DockPanel.Dock="Right" />
                <StackPanel>
                    <xctk:WatermarkTextBox Name="txtTitle" FontWeight="Bold" Watermark="Titel / Name" Margin="10,10,10,5"/>
                <xctk:WatermarkTextBox Name="txtDescription" Margin="10,0,10,10" TextWrapping="Wrap" Watermark="Beschreibung" AcceptsReturn="True" Height="50" VerticalScrollBarVisibility="Auto" />
                <CustomControls:UICustomLabel HeaderWidth="71" Header="Kategorie: " Margin="10,0,10,5">
                    <CustomControls:UICustomLabel.Child>
                          <ComboBox Name="cbCategory"  DockPanel.Dock="Left" IsReadOnly="True" />
                    </CustomControls:UICustomLabel.Child>
                </CustomControls:UICustomLabel>
                </StackPanel>
            </DockPanel>

            <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="10" Grid.Row="1">
                <Button Name="btnSave" Content="Speichern" Width="80" Height="25" Click="BtnSaveClick" />
                <Button Name="btnAbbort" Content="Abbrechen" Margin="7,0,0,0" Width="80" Height="25" Click="BtnAbbortClick" />
            </StackPanel>
            <xctk:ChildWindow Name="cldNewImage"  Caption="Neues Bild hinzufügen" Width="300" Height="120" IsModal="True" Left="150" Top="50">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition Height="auto"/>
                    </Grid.RowDefinitions>
                    <StackPanel Margin="5,10,5,5">
                        <DockPanel LastChildFill="True" Grid.Row="0">
                            <Button Name="btnBrowse" Content="Durchsuchen..." Click="BtnBrowseClick"  DockPanel.Dock="Right" Margin="5,0,0,0"/>
                            <TextBox Name="txtFilePath"/>
                        </DockPanel>
                    </StackPanel>
                    <StackPanel Grid.Row="1"  Orientation="Horizontal" HorizontalAlignment="Right" Margin="5" VerticalAlignment="Bottom">
                        <Button Name="btnOKNewImage" Content="OK" Width="70" Margin="0,0,5,0" Click="BtnOkNewImageClick" />
                        <Button Name="btnAbbortNewImage" Content="Abbrechen" Width="70" Click="BtnAbbortNewImageClick" />
                    </StackPanel>
                </Grid>
            </xctk:ChildWindow>
        </Grid>
        </xctk:BusyIndicator>
</Window>
